package com.naiterui.ehp.bs.b2c.product.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 药品表
 *
 * @author guoyongxiang
 * @date 2019-06-14 20:06
 * @since 1.0.0
 */
@Data
@Entity
@NoArgsConstructor
@Table(name = "p_medicine")
public class Medicine implements Serializable {

    private static final long serialVersionUID = 1195510494424518603L;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 商品ID
     */
    @Column(name = "product_id")
    private Long productId;

    /**
     * 产品编号
     */
    @Column(name = "number")
    private String number;

    /**
     * 商品名称 拼接规则：品牌 商品名 通用名
     */
    @Column(name = "name")
    private String name;

    /**
     * 药品名
     */
    @Column(name = "drug_name")
    private String drugName;

    /**
     * 通用名
     */
    @Column(name = "common_name")
    private String commonName;

    /**
     * 品牌名称
     */
    @Column(name = "brand_name")
    private String brandName;

    /**
     * 英文名
     */
    @Column(name = "english_name")
    private String englishName;

    /**
     * 汉语拼音
     */
    @Column(name = "pinyin")
    private String pinyin;

    /**
     * 安全分类，1：处方药；2：otc
     */
    @Column(name = "nmpa_type")
    private Integer nmpaType;

    /**
     * 药理分类ID
     */
    @Column(name = "pharmacology_classification_id")
    private Long pharmacologyClassificationId;

    /**
     * 型剂分类ID
     */
    @Column(name = "agent_classification_id")
    private Long agentClassificationId;

    /**
     * 药品分类ID
     */
    @Column(name = "drug_classification_id")
    private Long drugClassificationId;

    /**
     * 批准文号/注册证号
     */
    @Column(name = "approval_number")
    private String approvalNumber;

    /**
     * 药品本位码
     */
    @Column(name = "standard_code")
    private String standardCode;

    /**
     * 原料分类，1：中药；2：西药；3：血液制品；4：诊断制剂
     */
    @Column(name = "material_type")
    private Integer materialType;

    /**
     * 展示分类ID
     */
    @Column(name = "category_id")
    private Long categoryId;

    /**
     * 外包装单位（盒、瓶。。。)
     */
    @Column(name = "packing_unit")
    private String packingUnit;

    /**
     * 最小包装单位（片、粒。。。）
     */
    @Column(name = "packing_unit_limit")
    private String packingUnitLimit;

    /**
     * 规格
     */
    @Column(name = "specification")
    private String specification;

    /**
     * 贮藏
     */
    @Column(name = "storage")
    private String storage;

    /**
     * 化学名称
     */
    @Column(name = "chemical_name")
    private String chemicalName;

    /**
     * 成分
     */
    @Column(name = "ingredients")
    private String ingredients;

    /**
     * 性状
     */
    @Column(name = "phenotypic_trait")
    private String phenotypicTrait;

    /**
     * 适应症
     */
    @Column(name = "indications")
    private String indications;

    /**
     * 用法用量
     */
    @Column(name = "usage_dosage")
    private String usageDosage;

    /**
     * 不良反应
     */
    @Column(name = "adverse_effects")
    private String adverseEffects;

    /**
     * 禁忌
     */
    @Column(name = "contraindications")
    private String contraindications;

    /**
     * 注意事项
     */
    @Column(name = "matters_needing_attention")
    private String mattersNeedingAttention;

    /**
     * 生产企业
     */
    @Column(name = "production_enterprise")
    private String productionEnterprise;

    /**
     * 有效期
     */
    @Column(name = "period_validity")
    private String periodValidity;

    /**
     * 执行标准
     */
    @Column(name = "execution_standard")
    private String executionStandard;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    @Column(name = "version")
    private Integer version;

}
